CFLAGS  := -Wall -Wextra -Werror -O3
PRJDIR  := $(CURDIR)
LIB     := -L$(PRJDIR)/lib -lants
INC     := -I$(PRJDIR)/include
CXX     := g++

library:
	@$(MAKE) -C ./lib "CFLAGS=$(CFLAGS)" "INC=$(INC)" "PRJDIR=$(PRJDIR)"

demo: library
	$(CXX) $(CFLAGS) $(INC) $(PRJDIR)/src/demo.cpp -o demo $(LIB)

clean:
	@$(MAKE) -C ./lib clean
	@$(RM) -f demo
	@$(RM) -f $(PRJDIR)/lib/libants.a
